home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 September / Chip_2001-09_cd1.bin / sharewar / webscrip / webscripter4s.exe / {app} / Includes / jsPopup.ob < prev    next >
Encoding:
Text File  |  2001-07-11  |  1.5 KB  |  58 lines

  1. //begin_lib <!-- Begin External JavaScript -- DO NOT REMOVE THIS LINE -->
  2.  
  3. function jsPopup(){
  4. this.History = false;
  5. this.Directories = false;
  6. this.Height = 0;
  7. this.Width = 0;
  8. this.Left = 0;
  9. this.Top = 0;
  10. this.Location = false;
  11. this.Menus = false;
  12. this.Resizable = false;
  13. this.Scrollbars = false;
  14. this.Statusbar = false;
  15. this.Toolbar = false;
  16. this.URL = "";
  17. this.Name = "";
  18. this.Content = new Array();
  19. this.AddContent = w_AddContent;
  20. this.Popup = w_Popup;
  21. this.PopDynamic = w_Dynamic;
  22. }
  23.  
  24. function w_getFeatures(ob){
  25. var ft = ob.History ? "copyhistory" : "" ;
  26. ft+= ob.Directories ? ",directories" : "";
  27. ft+= ob.Height>0 ? ",height="+ob.Height : "";
  28. ft+= ob.Width>0 ? ",width="+ob.Width : "";
  29. ft+= ob.Left>0 ? ",left="+ob.Left+",screenX="+ob.Left : "";
  30. ft+= ob.Top>0 ? ",top="+ob.Top+",screenY="+ob.Top : "";
  31. ft+= ob.Location ? ",location" : "";
  32. ft+= ob.Menus ? ",menubar" : "";
  33. ft+= ob.Resizable ? ",resizable" : "";
  34. ft+= ob.Scrollbars ? ",scrollbars" : "";
  35. ft+= ob.Statusbar ? ",status" : "";
  36. ft+= ob.Toolbar ? ",toolbar" : "";
  37. return ft;
  38. }
  39.  
  40. function w_AddContent(str){
  41. this.Content.push(str);
  42. }
  43.  
  44. function w_Popup(){
  45. return window.open(this.URL,this.Name,w_getFeatures(this));
  46. }
  47.  
  48. function w_Dynamic(){
  49. var PW = window.open("",this.Name,w_getFeatures(this));
  50.      for(var i = 0; i < this.Content.length; i++){
  51.      PW.document.write(this.Content[i]);
  52.      }
  53. PW.document.close();
  54. return PW;
  55. }
  56.  
  57. //end_lib <!-- End External JavaScript -- DO NOT REMOVE THIS LINE -->
  58.